//
//  DrawerTableViewCell.m
//  Moment
//
//  Created by dllo on 15/12/22.
//  Copyright © 2015年 谭泽源. All rights reserved.
//

#import "DrawerTableViewCell.h"

@implementation DrawerTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)createSubviews
{
    self.contentView.backgroundColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1];

    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(30, 5, self.contentView.frame.size.height - 10, self.contentView.frame.size.height - 10)];
    self.imageV.image = [UIImage imageNamed:@"iconfont-menu-3.png"];
    [self.contentView addSubview:self.imageV];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(self.imageV.frame.origin.x + self.imageV.frame.size.width + 20, self.imageV.frame.origin.y, 200, self.imageV.frame.size.height)];
    //self.label.text = @"首页";
    self.label.font = [UIFont systemFontOfSize:20];
    [self.label setTextColor:[UIColor colorWithRed:0.57 green:0.57 blue:0.57 alpha:1]];
    [self.contentView addSubview:self.label];
    
}


- (void)setName:(NSString *)lableName imageName:(NSString *)imageName
{
    self.label.text = lableName;
    self.imageV.image = [UIImage imageNamed:imageName];
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
